import React, { Component } from 'react'
import Son from "./Son"

export default class Father extends Component {
  state = {
    num:''
  }
  fn = (num) => {
    this.setState({
      num
    })
  }
  render() {
    const { num } =this.state
    return (
      <div>
        <h2>Father-- {num}   </h2>
        <Son fn={ this.fn} />

      </div>
    )
  }
}
